package com.ethink.order.api.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.math.BigDecimal;

/**
 * 销售需求详情单 新增请求对象
 *
 * @author default
 * @date 2022-11-04
 */
@Data
public class SaleDemandOrderDetailAddRequest {

    @Schema(description = "销售需求单号", hidden = true)
    private String orderNo;

    @Schema(description = "销售需求详情单号", hidden = true)
    private String detailOrderNo;

    @Schema(description = "是否锁单")
    private Boolean isLock;

    @Schema(description = "商品编码")
    @NotNull
    private String mateCode;

    @Schema(description = "商品名称")
    private String mateName;

    @Schema(description = "商品SKU")
    private String mateSku;

    @Schema(description = "商品SKU名称")
    private String mateSkuName;

    @Schema(description = "大类编号名称")
    private String generaCodeName;

    @Schema(description = "大类编号")
    private String generaCode;

    @Schema(description = "中类编号名称")
    private String minorDefectsCodeName;

    @Schema(description = "中类编号")
    private String minorDefectsCode;

    @Schema(description = "小类编号名称")
    private String subclassCodeName;

    @Schema(description = "小类编号")
    private String subclassCode;

    @Schema(description = "商品分类")
    private String categoryName;

    @Schema(description = "品牌编码")
    private String brandCode;

    @Schema(description = "品牌名称")
    private String brandName;

    @Schema(description = "商品条码")
    private String internationCode;

    @Schema(description = "包装单位编码")
    private String unitCode;

    @Schema(description = "包装单位编码")
    private String unitName;

    @Schema(description = "商品规格")
    private String productSpecification;

    @Schema(description = "需求数量")
    @NotNull
    private Integer demandQty;

    @Schema(description = "需求确认数量")
    private Integer demandAffirmQty;

    @Schema(description = "最差需求期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date worstDemandPeriod;

    @Schema(description = "需求交期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date demandPeriod;

    @Schema(description = "截单日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private Date endTime;

    @Schema(description = "预计销售价(含税)")
    private BigDecimal exceptSalePriceTax;

    @Schema(description = "预计销售价(不含税)")
    private BigDecimal exceptSalePriceNoTax;

    @Schema(description = "预计销售价-本币(不含税)")
    private BigDecimal exceptSalePriceNoTaxLocal;

    @Schema(description = "预计销售价-本币(含税)")
    private BigDecimal exceptSalePriceTaxLocal;

    @Schema(description = "目标成本-本币")
    private BigDecimal targetCostLocal;

    @Schema(description = "预计毛利")
    private BigDecimal exceptGrossProfit;

    @Schema(description = "库存总数")
    private Integer totalQty;

    @Schema(description = "在途采购数量")
    private Integer purchasingQty;

    @Schema(description = "税率")
    private BigDecimal taxRate;

    @Schema(description = "折扣")
    private BigDecimal discount;

}
